package com.to_door_recycle.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 订单表
 * @TableName orders
 */
@TableName(value ="orders")
@Data
public class Orders implements Serializable {
    /**
     * 订单编号
     */
    @TableId(value = "id")
    private String id;

    /**
     * 下单时间
     */
    @TableField(value = "start_time")
    private Date startTime;

    /**
     * 接单时间
     */
    @TableField(value = "receive_time")
    private Date receiveTime;

    /**
     * 预约时间
     */
    @TableField(value = "book_time")
    private Date bookTime;

    /**
     * 预估回收金额
     */
    @TableField(value = "estimate_amount")
    private Integer estimateAmount;

    /**
     * 实际收款金额
     */
    @TableField(value = "actual_amount")
    private Integer actualAmount;

    /**
     * 订单状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 取消原因
     */
    @TableField(value = "cancel_reason")
    private String cancelReason;

    /**
     * 取消身份
     */
    @TableField(value = "cancel_identity")
    private String cancelIdentity;

    /**
     * 回收人员评分
     */
    @TableField(value = "recycler_score")
    private Integer recyclerScore;

    /**
     * 完成时间
     */
    @TableField(value = "complete_time")
    private Date completeTime;

    /**
     * 是否被删除
     */
    @TableField(value = "deleted")
    private Integer deleted;

    /**
     * 收款方式
     */
    @TableField(value = "receive_way")
    private String receiveWay;

    /**
     * 实际收款方式
     */
    @TableField(value = "actual_receive_way")
    private String actualReceiveWay;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 物品一级分类id
     */
    @TableField(value = "category_id")
    private Long categoryId;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 回收地址id
     */
    @TableField(value = "address_id")
    private Long addressId;

    /**
     * 接单人员id
     */
    @TableField(value = "recycler_id")
    private Integer recyclerId;

    /**
     * 评分
     */
    @TableField(value = "score")
    private Integer score;

    /**
     * 用户的最近一次的编辑时间
     */
    @TableField(value = "edit_time")
    private Date editTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Orders other = (Orders) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getReceiveTime() == null ? other.getReceiveTime() == null : this.getReceiveTime().equals(other.getReceiveTime()))
            && (this.getBookTime() == null ? other.getBookTime() == null : this.getBookTime().equals(other.getBookTime()))
            && (this.getEstimateAmount() == null ? other.getEstimateAmount() == null : this.getEstimateAmount().equals(other.getEstimateAmount()))
            && (this.getActualAmount() == null ? other.getActualAmount() == null : this.getActualAmount().equals(other.getActualAmount()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCancelReason() == null ? other.getCancelReason() == null : this.getCancelReason().equals(other.getCancelReason()))
            && (this.getCancelIdentity() == null ? other.getCancelIdentity() == null : this.getCancelIdentity().equals(other.getCancelIdentity()))
            && (this.getRecyclerScore() == null ? other.getRecyclerScore() == null : this.getRecyclerScore().equals(other.getRecyclerScore()))
            && (this.getCompleteTime() == null ? other.getCompleteTime() == null : this.getCompleteTime().equals(other.getCompleteTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getReceiveWay() == null ? other.getReceiveWay() == null : this.getReceiveWay().equals(other.getReceiveWay()))
            && (this.getActualReceiveWay() == null ? other.getActualReceiveWay() == null : this.getActualReceiveWay().equals(other.getActualReceiveWay()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getAddressId() == null ? other.getAddressId() == null : this.getAddressId().equals(other.getAddressId()))
            && (this.getRecyclerId() == null ? other.getRecyclerId() == null : this.getRecyclerId().equals(other.getRecyclerId()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getEditTime() == null ? other.getEditTime() == null : this.getEditTime().equals(other.getEditTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getReceiveTime() == null) ? 0 : getReceiveTime().hashCode());
        result = prime * result + ((getBookTime() == null) ? 0 : getBookTime().hashCode());
        result = prime * result + ((getEstimateAmount() == null) ? 0 : getEstimateAmount().hashCode());
        result = prime * result + ((getActualAmount() == null) ? 0 : getActualAmount().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCancelReason() == null) ? 0 : getCancelReason().hashCode());
        result = prime * result + ((getCancelIdentity() == null) ? 0 : getCancelIdentity().hashCode());
        result = prime * result + ((getRecyclerScore() == null) ? 0 : getRecyclerScore().hashCode());
        result = prime * result + ((getCompleteTime() == null) ? 0 : getCompleteTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getReceiveWay() == null) ? 0 : getReceiveWay().hashCode());
        result = prime * result + ((getActualReceiveWay() == null) ? 0 : getActualReceiveWay().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getAddressId() == null) ? 0 : getAddressId().hashCode());
        result = prime * result + ((getRecyclerId() == null) ? 0 : getRecyclerId().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getEditTime() == null) ? 0 : getEditTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", startTime=").append(startTime);
        sb.append(", receiveTime=").append(receiveTime);
        sb.append(", bookTime=").append(bookTime);
        sb.append(", estimateAmount=").append(estimateAmount);
        sb.append(", actualAmount=").append(actualAmount);
        sb.append(", status=").append(status);
        sb.append(", cancelReason=").append(cancelReason);
        sb.append(", cancelIdentity=").append(cancelIdentity);
        sb.append(", recyclerScore=").append(recyclerScore);
        sb.append(", completeTime=").append(completeTime);
        sb.append(", deleted=").append(deleted);
        sb.append(", receiveWay=").append(receiveWay);
        sb.append(", actualReceiveWay=").append(actualReceiveWay);
        sb.append(", remark=").append(remark);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", userId=").append(userId);
        sb.append(", addressId=").append(addressId);
        sb.append(", recyclerId=").append(recyclerId);
        sb.append(", score=").append(score);
        sb.append(", editTime=").append(editTime);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}